﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using ThreeByte.ActiveDeck.Web.Models;

namespace ThreeByte.ActiveDeck.Dashboard.Controls
{
    public partial class ConfirmDeleteDialog : ChildWindow
    {
        public ConfirmDeleteDialog() {
            InitializeComponent();
        }

        public ConfirmDeleteDialog(Presentation presentation) : this() {
            Presentation = presentation;
        }

        public Presentation Presentation { get; private set; }

        protected override void OnOpened() {
            base.OnOpened();

            WarningText.Inlines.Clear();
            WarningText.Inlines.Add(new Run(){ Text = string.Format("Are you sure you want to delete presentation {0}?", Presentation.ID) });
            WarningText.Inlines.Add(new LineBreak());
            WarningText.Inlines.Add(new LineBreak());
            WarningText.Inlines.Add(new Run() { Text = "You cannot undo this action." });
            
        
        }
        private void OKButton_Click(object sender, RoutedEventArgs e) {
            this.DialogResult = true;
        }

        private void CancelButton_Click(object sender, RoutedEventArgs e) {
            this.DialogResult = false;
        }
    }
}

